<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blogmer Documentation</title>

<style type='text/css' media='all'>@import url('../css/userguide.css');</style>
<link rel='stylesheet' type='text/css' media='all' href='../css/userguide.css' />

<meta http-equiv='expires' content='-1' />
<meta http-equiv= 'pragma' content='no-cache' />
<meta name='robots' content='all' />
</head>
<body>
<!-- START NAVIGATION -->
<div id="nav"><div id="nav_inner"></div></div>
<div id="nav2"><a name="top">&nbsp;</a></div>
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td><h1>Blogmer beta 2</h1></td>
<td id="breadcrumb_right"><a href="table_of_content.html">Table of contents</a></td>
</tr>
</table>
</div>
<!-- END NAVIGATION -->


<!-- START BREADCRUMB -->
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td id="breadcrumb">
  <p><a href="http://speedovation.org/" >Speedovation</a> &nbsp;&#8250;&nbsp;
      <a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
    Table of contents</p>
  </td>

</tr>
</table>
<!-- END BREADCRUMB -->

<br clear="all" />


<!-- START CONTENT -->
<div id="content">


<h1>Comments_model</h1>

<p>Comments_model is used to create and manage posts (blog).</p>

<p class="important"><strong>Beta:</strong>&nbsp; This is an <kbd>Beta</kbd> model. It can be changed anytime.</p>
	
<p>Functions:</p>

<ul><li>ReadComments($URLTitle)</li>
  <li>SaveComment()</li>
  <li>UpdateComment($comment_id,$page_id)</li>
  <li>DeleteComment($comment_id,$page_id)</li>
  <li> ListAllComments($pageid=1)</li>
</ul>

<h2>Comments_model Function Reference</h2>

<h3>$this-&gt;Comments_model-&gt;ReadComments($URLTitle)</h3>
<p>Read comments for $URLTitle condition.Output will be a string.</p>
<p>Output</p>
<p><code>&lt;a name=&quot;comments&quot; id=&quot;comments&quot;&gt;&lt;/a&gt;<br />
&lt;div id=&quot;user-comments&quot;&gt;<br />
&lt;h2&gt;User Comments&lt;/h2&gt;';<br />
<br />
{<br />
<br />
<br />
&lt;a name=&quot;comments'.$row-&gt;CommentID.'&quot; id=&quot;comments'.$row-&gt;CommentID.'&quot;&gt;&lt;/a&gt;<br />
&lt;div class=&quot;guest&quot;&gt;&lt;p&gt;'.$link.' on '.$date.'&lt;/p&gt;<br />
&lt;p&gt;'.$row-&gt;Content.'&lt;/p&gt;&lt;/div&gt;';<br />
<br />
'&lt;a name=&quot;comments'.$row-&gt;CommentID.'&quot; id=&quot;comments'.$row-&gt;CommentID.'&quot;&gt;&lt;/a&gt;<br />
&lt;div class=&quot;member&quot;&gt;&lt;p&gt;'.$link.' on '.$date.' - '.anchor('users/ViewProfile/'.$member['MemberID'],'View Profile').'&lt;/p&gt;<br />
&lt;p&gt;'.$row-&gt;Content.'&lt;/div&gt;&lt;/p&gt;';<br />
<br />
}<br />
<br />
&lt;/div&gt;</code></p>
<p class="important">Brackets show loop for content. You can customize this for custom themes.</p>
<h3>$this-&gt;Comments_model-&gt;SaveComment()</h3>
<p>Capture the posted data  using input class. Store this data into database.No argument.</p>
<h3>$this-&gt;Comments_model-&gt;UpdateComment($comment_id,$page_id)</h3>
<p>Grab the posted data using input class. Updates an already existing data entry of id $comment_id and redirects it to $page_id .</p>
<p></p>
<h3>$this-&gt;Comments_model-&gt;DeleteComment($comment_id,$page_id)</h3>
<p>Deletes an already existing data entry of id $comment_id and redirects it to $page_id </p>
<p></p>
<h3>$this-&gt;Comments_model-&gt;ListAllComments($pageid=1)</h3>
<p>Show the all post entries into a tabular form with values.</p>
<p>Comment ID  	| Posted In  	| Comment  	| Edit  	| Delete</p>
<h2>Final Collection</h2>
<p>
	<code>
    	$this->load->model('Comments_model');<br />
        $this->Comments_model->ReadComments($URLTitle);<br />
        $this-&gt;Comments_model-&gt;SaveComment();<br />
        $this->Comments_model->UpdateComment($comment_id,$page_id);<br />
        $this->Comments_model->DeleteComment($comment_id,$page_id);<br />
        $this->Comments_model->ListAllComments($pageid=1);</code></p>

</div>
<!-- END CONTENT -->


<div id="footer">
<p><a href="#top">Top of Page</a></p>
<p><a href="http://speedovation.com">Speedovation</a> &nbsp;&middot;&nbsp; Copyright &#169; 2007-2008 &nbsp;&middot;&nbsp; <a href="http://speedovation.org/">Blogmer</a></p></div>

</body>
</html>